package com.letu.core.dynamic;

import com.letu.annotation.annotation.base.BaseControllerInfo;

/**
 * VO数据拦截器 存储数据
 */
public class DynamicData {

    //装载VO类
    private final static ThreadLocal<Class> groupClassThreadLocal = new ThreadLocal<>();

    //语言
    private final static ThreadLocal<BaseControllerInfo> baseControllerInfoThreadLocal = new ThreadLocal<>();

    public static Class getGroupClassThreadLocal() {
        return groupClassThreadLocal.get();
    }

    public static void setGroupClassThreadLocal(Class class1) {
        DynamicData.groupClassThreadLocal.set(class1);
    }

    public static void removeThreadData(){
        groupClassThreadLocal.remove();
        baseControllerInfoThreadLocal.remove();
    }



    public static BaseControllerInfo getBaseControllerInfoThreadLocal() {
        return baseControllerInfoThreadLocal.get();
    }

    public static void setBaseControllerInfoThreadLocal(BaseControllerInfo baseControllerInfo) {
        DynamicData.baseControllerInfoThreadLocal.set(baseControllerInfo);
    }

}
